@echo off

set DOCKER_HOST=http://192.168.1.15:2375

set INSTALL_PATH=%~dp0

echo INSTALL_PATH:%INSTALL_PATH%

call    :install_all


call    :build_edsta-modules-signalAnalysis

call    :build_edsta-modules-cae
call    :build_edsta-modules-system
call    :build_edsta-modules-file
call    :build_edsta-modules-simulation
call    :build_edsta-modules-csharpServer
call    :build_edsta-modules-testability
call    :build_edsta-modules-reliability
call    :build_edsta-modules-circuitDesign
call    :build_edsta-modules-driverAdapt
call    :build_edsta-modules-diagnosisPredict
call    :build_edsta-modules-reliabilityLog
call    :build_edsta-modules-pcba


exit /b




:install_all
(
    set "METHOD_NAME=%~n0_method"
    mvn   clean install   -Dskipprods -P prod   -Ddockerfile.skip  
)

:build_edsta-modules-cae
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-cae
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)

:build_edsta-modules-circuitDesign
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-circuitDesign
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)

:build_edsta-modules-csharpServer
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-csharpServer
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)

:build_edsta-modules-simulation
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-simulation
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)


:build_edsta-modules-diagnosisPredict
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-diagnosisPredict
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)


:build_edsta-modules-driverAdapt
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-driverAdapt
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)




:build_edsta-modules-system
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-system
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)


:build_edsta-modules-file
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-file
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)



:build_edsta-modules-signalAnalysis
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-signalAnalysis
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)


:build_edsta-modules-testability
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-testability
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)



:build_edsta-modules-reliability
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-reliability
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)

:build_edsta-modules-circuitDesign
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-circuitDesign
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)


:build_edsta-modules-reliabilityLog
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-reliabilityLog
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)



:build_edsta-modules-pcba
(
   set "METHOD_NAME=%~n0_method"
   echo %METHOD_NAME%
   cd edsta-modules\edsta-modules-pcba
   mvn     -DskipTests -P prod  com.spotify:dockerfile-maven-plugin:1.4.13:build	 com.spotify:dockerfile-maven-plugin:1.4.13:push
   cd %INSTALL_PATH%
)



